package com.project.class4_8;

public class Test {
    public static void main(String[] args) {
        Man m = new Man();

    }
}

//class Bird {
//    public void fly(){}
//}
//
//class Fish{
//    public void swim(){}
//}
//
//class Man extends Bird{
//
//}

class Plane{
    public void fly(){

    }
}

class Ship{
    public void swim(){

    }
}

class Man {
    private Ship s = new Ship();
    private Plane p = new Plane();

    public void fly(){
        p.fly();
    }
    public void swim(){
        s.swim();
    }
}